package cn.itcast.bos.service.base;


import cn.itcast.bos.domain.page.PageBean;
import cn.itcast.bos.domain.take_delivery.Promotion;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;

import javax.ws.rs.*;
import java.util.Date;

public interface PromotionService {
  public   void save(Promotion model);

   public Page<Promotion> findPageData(Pageable pageable);

   //根据page和rows 返回分页数据
    @Path("/pageQuery")
    @GET
    @Produces({"application/xml","application/json"})
    public PageBean<Promotion> findPageData(@QueryParam("page") int page,@QueryParam("rows") int rows);

    @Path("/promotion/{id}")
    @GET
    @Produces({"application/xml","application/json"})
    public  Promotion findPromotionById(@PathParam("id") Integer id);

    public void updateStatus(Date date);
}
